package com.lagou.service;

import com.lagou.service.fallback.EmailServiceFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @Author : liuchangling
 * @Descrition :
 * @Date： Created in 5:59 下午 2022/1/31
 */
@Primary
@FeignClient(name = "lagou-service-email", path = "/email", fallback = EmailServiceFeignClientFallback.class)
public interface EmailServiceFeignClient {

    @RequestMapping(value = "/{email}/{code}",method = RequestMethod.GET)
    Boolean sendMail(@PathVariable("email") String email, @PathVariable("code") String code);

}
